#include "ieffect.h"
#include "ishader.h"

namespace gecko
{

void IEffect::SetTechnique( const char* techName )
{
	m_Shader->SetTechnique(techName);
}

void IEffect::Begin()
{
	m_Shader->SetTechnique("Main");
	m_Shader->Begin();
}

void IEffect::End()
{
	m_Shader->End();
}

void IEffect::BeginPass(unsigned int pass)
{
	m_Shader->BeginPass(pass);
}

void IEffect::EndPass()
{
	m_Shader->EndPass();
}

void IEffect::Commit()
{
	m_Shader->Commit();
}

void IEffect::SetMatrix(unsigned int parameter, const Matrix44& m)
{
	m_Shader->SetMatrix(parameter, m);
}

void IEffect::SetVector(unsigned int parameter, const Vector3f& v)
{
	m_Shader->SetVector(parameter, v);
}

void IEffect::SetFloat(unsigned int parameter, float f)
{
	m_Shader->SetFloat(parameter, f);
}

//void SetTexture(unsigned int parameter, Texture* texture)

void IEffect::SetColour(unsigned int parameter, const Colour& colour)
{
	m_Shader->SetColour(parameter, colour);
}

GeometryBatch* IEffect::GetRenderBatch()
{
	return m_Shader->GetRenderBatch();
}

void IEffect::SetRenderBatch(GeometryBatch* batch)
{
	m_Shader->SetRenderBatch(batch);
}

void IEffect::Destroy()
{
	m_Shader->Destroy();
}

unsigned int IEffect::GetNumPasses()
{
	return m_Shader->GetNumPasses();
}

}